[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   Description: Get a mouse click and return the handle number
Mapped Command: WAIT EVENT TO
FUNCTION __WaitForEvent(flash)
   local handle, label
   flash  := if(flash == NIL,TRUE,flash)         // are we going to flash the object on selection
   do while TRUE                                 // loop until the mouse has been clicked
      do while TRUE                              // loop until the mouse has been clicked
         if mstatus() == 1                       // if the mouse has been clicked
            exit                                 // exit from the loop
         endif                                   // mstatus() == 1
      enddo                                      // continue looping
      handle := mgethot()                        // get the handle where it was clicked (may be zero)
      if handle > 0                              // if the click was in a hot region
         if _handles_[handle,9] == ActiveObject  // if the object selected is active
            label := __FindObject(handle)        // determine the object name of the handle that was clicked
            if flash                             // if a flash has been requested on selection
               __FlaEventRegion(label)           // flash the object with the shadow
            endif                                // if flash
            retu(label)                          // return the handle label
         endif
      endif                                      // if _handles_[handle,?]
   enddo                                         // do while true                                 // loop until the mouse has been clicked
RETURN("")                                       // return a blank label

See Also: WAIT EVENT TO
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson